package com.ljc;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ljchen
 * @date 2022-08-08 18:17
 * @desc
 * Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
 *
 * An input string is valid if:
 *
 * Open brackets must be closed by the same type of brackets.
 * Open brackets must be closed in the correct order.
 * Example 1:
 *
 * Input: s = "()"
 * Output: true
 * Example 2:
 *
 * Input: s = "()[]{}"
 * Output: true
 * Example 3:
 *
 * Input: s = "(]"
 * Output: false
 * Constraints:
 *
 * 1 <= s.length <= 104
 * s consists of parentheses only '()[]{}'.
 */
public class E20ValidParentheses {

    public static void main(String[] args) {
        // 获取所有智能看板类型的枚举值
        List<String> amTypeCdList = new ArrayList<String>(){{
            add("10");
            add("20");
            add("30");
            add("40");
            add("50");
            add("60");
            add("70");
        }};
        // 将智能看板类型筛选出来
        List<String> typeCdList = new ArrayList<String>(){{
            add("20");
            add("50");
            add("70");
        }};

        // 筛选出数据库中不存在的看板数据 补全数据库数据 开关状态全部是false
        amTypeCdList = amTypeCdList.stream().filter(typeCd -> !typeCdList.contains(typeCd)).collect(Collectors.toList());

        System.out.println(amTypeCdList);
    }




}
